package ttc.sftp.user;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class UserDatabaseHelper extends SQLiteOpenHelper {
	
	public static final String DB_NAME="sftp";
	public static final int DB_VERSION=1;
	
	public static final String TABLE_ACCOUNT="Account";
	public static final String ID="_id";
	public static final String USERNAME="username";
	public static final String PASS="password";
	public static final String HOST="host";
	public static final String PORT="port";
	
	private String CREATEDB="create table "+TABLE_ACCOUNT
			+"("
				+ID+" INTEGER PRIMARY KEY AUTOINCREMENT, "
				+USERNAME+" TEXT, "
				+PASS+" TEXT, "
				+HOST+" TEXT, "
				+PORT+" TEXT"
			+")";
	
	
	public UserDatabaseHelper(Context context) {
		super(context, DB_NAME, null, DB_VERSION);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL(CREATEDB);
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}

}
